﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GzipCompression.aspx.cs"
    Inherits="ASPNETPerformance._02_JsAndCss.GzipCompression" MasterPageFile="~/Site.master" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h2>
        Gzip压缩Javascript与CSS</h2>
    <p>
        下面的示例是CSS压缩与未压缩的比较版</p>
    <p>
        <b>～/_assets/css/下文件的内容</b><br />
        <asp:GridView ID="gvCssFilesByDebug" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="文件名" SortExpression="Name">
                    <ItemTemplate>
                        <%# Eval("Name") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="FileSystemType" HeaderText="类别" SortExpression="FileSystemType" />
                <asp:BoundField DataField="LastWriteTime" HeaderText="修改日期" SortExpression="LastWriteTime" />
                <asp:TemplateField HeaderText="大小" SortExpression="Size" ItemStyle-HorizontalAlign="Right">
                    <ItemTemplate>
                        <%# DisplaySize((long?) Eval("Size")) %>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Right"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </p>
    <p>
        <b>～/_assets/css/Release/zip/下文件的内容</b><br />
        <asp:GridView ID="gvCssFilesByRelease" runat="server" AutoGenerateColumns="False"
            CellPadding="4" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="文件名" SortExpression="Name">
                    <ItemTemplate>
                        <%# Eval("Name") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="FileSystemType" HeaderText="类别" SortExpression="FileSystemType" />
                <asp:BoundField DataField="LastWriteTime" HeaderText="修改日期" SortExpression="LastWriteTime" />
                <asp:TemplateField HeaderText="大小" SortExpression="Size" ItemStyle-HorizontalAlign="Right">
                    <ItemTemplate>
                        <%# DisplaySize((long?) Eval("Size")) %>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Right"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </p>
    <hr />
    <p>
        下面的示例是Javascript压缩与未压缩的比较版</p>
    <p>
        <b>～/_assets/js/下文件的内容</b><br />
        <asp:GridView ID="gvJsFilesByDebug" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="文件名" SortExpression="Name">
                    <ItemTemplate>
                        <%# Eval("Name") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="FileSystemType" HeaderText="类别" SortExpression="FileSystemType" />
                <asp:BoundField DataField="LastWriteTime" HeaderText="修改日期" SortExpression="LastWriteTime" />
                <asp:TemplateField HeaderText="大小" SortExpression="Size" ItemStyle-HorizontalAlign="Right">
                    <ItemTemplate>
                        <%# DisplaySize((long?) Eval("Size")) %>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Right"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </p>
    <p>
        <b>～/_assets/js/Release/zip/下文件的内容</b><br />
        <asp:GridView ID="gvJsFilesByRelease" runat="server" AutoGenerateColumns="False"
            CellPadding="4" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="文件名" SortExpression="Name">
                    <ItemTemplate>
                        <%# Eval("Name") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="FileSystemType" HeaderText="类别" SortExpression="FileSystemType" />
                <asp:BoundField DataField="LastWriteTime" HeaderText="修改日期" SortExpression="LastWriteTime" />
                <asp:TemplateField HeaderText="大小" SortExpression="Size" ItemStyle-HorizontalAlign="Right">
                    <ItemTemplate>
                        <%# DisplaySize((long?) Eval("Size")) %>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Right"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </p>
</asp:Content>
